/**
 * 
 */
package com.jquery.ui.tags.javascript.dialog;

import com.jquery.ui.core.base.BaseTag;
import com.jquery.ui.core.bean.UIBean;
import com.jquery.ui.dictionary.IDlgTypeEnum;
import com.jquery.ui.tags.beans.script.DialogScriptUI;

/**
 * @author linyajun
 * 
 * @date	2013-9-24
 * @description   
 */
public class DialogTag extends BaseTag {

	/**
	 * 
	 */
	private static final long serialVersionUID = -5605892257044854836L;
	private String title;
	private String width;
	private String height;
	private Boolean modal=false;
	private String dialogType="common";
	private String src;

	
	/**
	 * @return the modal
	 */
	public Boolean getModal() {
		return modal;
	}


	/**
	 * @param modal the modal to set
	 */
	public void setModal(Boolean modal) {
		this.modal = modal;
	}


	@Override
	public String getEndTemplate() {
		// TODO Auto-generated method stub
		return "dialog-script.ftl";
	}

	
	@Override
	public String getStartTemplate() {
		// TODO Auto-generated method stub
		return null;
	}

	
	@Override
	public UIBean getUiBean() {
		DialogScriptUI dialog=new DialogScriptUI();
		dialog.setTitle(title);
		dialog.setWidth(width);
		dialog.setHeight(height);
		dialog.setModal(modal);
		dialog.setSrc(src);
		dialog.setDialogType(IDlgTypeEnum.parseType(dialogType));
		return dialog;
	}


	/**
	 * @return the title
	 */
	public String getTitle() {
		return title;
	}


	/**
	 * @param title the title to set
	 */
	public void setTitle(String title) {
		this.title = title;
	}


	/**
	 * @return the width
	 */
	public String getWidth() {
		return width;
	}


	/**
	 * @param width the width to set
	 */
	public void setWidth(String width) {
		this.width = width;
	}


	/**
	 * @return the height
	 */
	public String getHeight() {
		return height;
	}


	/**
	 * @param height the height to set
	 */
	public void setHeight(String height) {
		this.height = height;
	}


	/**
	 * @return the dialogType
	 */
	public String getDialogType() {
		return dialogType;
	}


	/**
	 * @param dialogType the dialogType to set
	 */
	public void setDialogType(String dialogType) {
		this.dialogType = dialogType;
	}


	/**
	 * @return the src
	 */
	public String getSrc() {
		return src;
	}


	/**
	 * @param src the src to set
	 */
	public void setSrc(String src) {
		this.src = src;
	}
	
	

}
